package manage.service.impl;

import manage.dao.RoleMapper;
import manage.model.Role;
import manage.service.RoleServcie;
import manage.util.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: create by  Raphaelkxy
 * @version: v1.0
 * @description: manage.service.impl
 * @date:2019/8/26
 */
@Service
public class RoleServiceImpl implements RoleServcie {


    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> getALl() {
        return roleMapper.selectAll();
    }

    @Override
    public int saveRole(Role role) {
      return  roleMapper.insert(role);
    }

    @Override
    public int deleteByid(int id) {
       return roleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateRole(Role role) {
        return roleMapper.updateByPrimaryKey(role);
    }

    @Override
    public int deleteByPrimaryKey(String username) {
        return 0;
    }

    @Override
    public String insert(Object record) {
        return null;
    }

    @Override
    public String insertSelective(Object record) {
        return null;
    }

    @Override
    public Object selectByPrimaryKey(String username) {
        return null;
    }

    @Override
    public String updateByPrimaryKeySelective(Object record) {
        return null;
    }

    @Override
    public String updateByPrimaryKey(Object record) {
        return null;
    }

    @Override
    public List<?> selectAll(PageInfo page) {
        return null;
    }

    @Override
    public Role getbyid(Integer id) {
        return roleMapper.selectByPrimaryKey(id);
    }


    //更新




}
